WPF和Silverlight版Chart2D帮助文档
在标记语言中创建甘特图

为创建甘特图,使用下面的XAML标记:

XAML
拷贝代码
<c1chart:C1Chart Margin="0" Name="c1Chart1"
            xmlns:sys="clr-namespace:System;assembly=mscorlib">
  <c1chart:C1Chart.Resources>
    <x:Array x:Key="start" Type="sys:DateTime" >
      <sys:DateTime>2008-6-1</sys:DateTime>
      <sys:DateTime>2008-6-4</sys:DateTime>
      <sys:DateTime>2008-6-2</sys:DateTime>
    </x:Array>
    <x:Array x:Key="end" Type="sys:DateTime">
      <sys:DateTime>2008-6-10</sys:DateTime>
      <sys:DateTime>2008-6-12</sys:DateTime>
      <sys:DateTime>2008-6-15</sys:DateTime>
    </x:Array>
  </c1chart:C1Chart.Resources>
  <c1chart:C1Chart.Data>
    <c1chart:ChartData>
      <c1chart:ChartData.Renderer>
        <c1chart:Renderer2D Inverted="True" ColorScheme="Point"/>
      </c1chart:ChartData.Renderer>
      <c1chart:ChartData.ItemNames>Task1 Task2 Task3</c1chart:ChartData.ItemNames>
      <c1chart:HighLowSeries HighValuesSource="{StaticResource end}"
                        LowValuesSource="{StaticResource start}"/>
    </c1chart:ChartData>
  </c1chart:C1Chart.Data>
  <c1chart:C1Chart.View>
    <c1chart:ChartView>
      <c1chart:ChartView.AxisX>
        <c1chart:Axis IsTime="True" AnnoFormat="d"/>
      </c1chart:ChartView.AxisX>
    </c1chart:ChartView>
  </c1chart:C1Chart.View>
</c1chart:C1Chart>

 

查看其它

 

 


产品网站:http://www.gcpowertools.com.cn  |  咨询热线:4006576008   |   ©2015 西安葡萄城